package net.lahuobao.mall.entity.finance.resultmodel;

import net.lahuobao.enums.mall.admin.*;
import net.lahuobao.export.datasoruce.annotation.ExportField;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.Date;

/**
 * Created by Administrator on 2017/1/19.
 */
public class MallOrderReportResultModel {


    @ExportField(title = "订单编号", sort = 10)
    private String orderNo;

    @ExportField(title = "", isShow = 0, sort = 20)
    private Integer orderType;

    @ExportField(title = "订单类型", sort = 30)
    private String orderTypeName;

    @ExportField(title = "", isShow = 0, sort = 40)
    private Integer orderStatus;

    @ExportField(title = "订单状态", sort = 50)
    private String orderStatusName;

    @ExportField(title = "", isShow = 0, sort = 60)
    private Integer settlementStatus;

    @ExportField(title = "结算状态", sort = 70)
    private String settlementStatusName;

    @ExportField(title = "商家名称", sort = 80)
    private String sellerName;

    @ExportField(title = "店铺名称", sort = 90)
    private String shopName;

    @ExportField(title = "商品编码", sort = 100)
    private String productCode;

    @ExportField(title = "商品名称", sort = 110)
    private String productName;

    @ExportField(title = "充值卡号", sort = 120)
    private String cardNo;

    @ExportField(title = "数量", sort = 130)
    private Integer amount;

    @ExportField(title = "单价", sort = 140)
    private BigDecimal price;

    @ExportField(title = "交易金额", sort = 150)
    private BigDecimal totalMoney;

    //车主电话
    @ExportField(title = "车主电话", sort = 151)
    private String vehiclePhoneNum;

    //车主姓名
    @ExportField(title = "车主姓名", sort = 152)
    private String vehicleName;

    @ExportField(title = "项目名", sort = 153)
    private String projectName;

    @ExportField(title = "买家", sort = 160)
    private String buyerName;

    @ExportField(title = "用户名", sort = 161)
    private String userName;

    @ExportField(title = "下单时间", isTranf = 1, tranfType = 2, sort = 170)
    private Timestamp orderCreateTime;

    @ExportField(title = "支付时间", isTranf = 1, tranfType = 2, sort = 180)
    private Timestamp payTime;

    @ExportField(title = "发货时间", isTranf = 1, tranfType = 2, sort = 190)
    private Timestamp expressTime;

    @ExportField(title = "交易完成时间", isTranf = 1, tranfType = 2, sort = 200)
    private Timestamp confirmTime;

    @ExportField(title = "消费实体店", sort = 210)
    private String offlineStoreName;

    @ExportField(title = "结算周期", sort = 220)
    private Integer settlementDay;

    @ExportField(title = "可结算日期", isTranf = 1,tranfType = 2, sort = 230)
    private Timestamp settlementTime;

    @ExportField(title = "交易总金额", sort = 240)
    private BigDecimal orderMoney;

    @ExportField(title = "结算金额", sort = 250)
    private BigDecimal settlementMoney;

    @ExportField(title = "交易服务费", sort = 270)
    private BigDecimal settlementExpenses;

    @ExportField(title = "提前结算服务费", sort = 280)
    private BigDecimal settlementExpensesAdvance;

    @ExportField(title = "申请结算人", sort = 290)
    private String applyUserName;

    @ExportField(title = "申请结算日期", isTranf = 1, tranfType = 2, sort = 300)
    private Timestamp applyTime;

    @ExportField(title = "结算人", sort = 310)
    private String settlementUserName;

    @ExportField(title = "结算日期", isTranf = 1,tranfType = 2, sort = 320)
    private Timestamp settlementTime1;

    /*买家实付金额*/
    @ExportField(title = "买家实付金额", sort = 330)
    private BigDecimal actualPayMoney;

    /*平台补贴金额*/
    @ExportField(title = "平台补贴金额", sort = 340)
    private BigDecimal subsidyMoney;

    /*补贴类型*/
    @ExportField(title = "", isShow = 0, sort = 350)
    private Integer subsidyType;

    /*补贴类型名称*/
    @ExportField(title = "补贴类型", sort = 360)
    private String subsidyTypeName;

    //订单完成时间--查询
    @ExportField(title = "", isShow = 0, sort = 370)
    private Timestamp orderFinishTime;


    public BigDecimal getActualPayMoney() {
        return actualPayMoney;
    }

    public void setActualPayMoney(BigDecimal actualPayMoney) {
        this.actualPayMoney = actualPayMoney;
    }

    public BigDecimal getSubsidyMoney() {
        return subsidyMoney;
    }

    public void setSubsidyMoney(BigDecimal subsidyMoney) {
        this.subsidyMoney = subsidyMoney;
    }

    public Integer getSubsidyType() {
        return subsidyType;
    }

    public void setSubsidyType(Integer subsidyType) {
        this.subsidyType = subsidyType;
    }

    public String getSubsidyTypeName() {
        if (this.subsidyType == null) {
            return "";
        } else {
            return EMallSubsidyType.valueOf(this.subsidyType);
        }

    }

    public void setSubsidyTypeName(String subsidyTypeName) {
        this.subsidyTypeName = subsidyTypeName;
    }


    public String getSettlementUserName() {

        if (settlementStatus != null && settlementStatus == EMallShopSettlementStatus.Settlement.getStatus()) {
            if (settlementUserName == null) {
                return "系统";
            }
            return settlementUserName;
        }
        return "";
    }

    public void setSettlementUserName(String settlementUserName) {
        this.settlementUserName = settlementUserName;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public Integer getOrderStatus() {

        return orderStatus;
    }

    public void setOrderStatus(Integer orderStatus) {
        this.orderStatus = orderStatus;
    }

    public String getOrderStatusName() {

        switch (orderType) {
            case 0:
                return EMallB2COrderStatus.valueOf(orderStatus);
            case 1:
                return EMallO2OOrderStatus.valueOf(orderStatus);
            case 2:
                return EMallVirtualOrderStatus.valueOf(orderStatus);
            default:
                return "";
        }
    }

    public void setOrderStatusName(String orderStatusName) {
        this.orderStatusName = orderStatusName;
    }

    public Integer getOrderType() {
        return orderType;
    }

    public void setOrderType(Integer orderType) {
        this.orderType = orderType;
    }

    public String getOrderTypeName() {
        return EMallOrderType.valueOf(orderType);
    }

    public void setOrderTypeName(String orderTypeName) {
        this.orderTypeName = orderTypeName;
    }

    public Integer getSettlementStatus() {
        return settlementStatus;
    }

    public void setSettlementStatus(Integer settlementStatus) {
        this.settlementStatus = settlementStatus;
    }

    public String getSettlementStatusName() {
        if (orderStatus.intValue() == 5 && settlementStatus != null) {
            return EMallShopSettlementStatus.valueOf(settlementStatus);
        }
        return "未结算";
    }

    public void setSettlementStatusName(String settlementStatusName) {
        this.settlementStatusName = settlementStatusName;
    }

    public String getSellerName() {
        return sellerName;
    }

    public void setSellerName(String sellerName) {
        this.sellerName = sellerName;
    }

    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    public String getProductCode() {
        return productCode;
    }

    public void setProductCode(String productCode) {
        this.productCode = productCode;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getCardNo() {
        return cardNo;
    }

    public void setCardNo(String cardNo) {
        this.cardNo = cardNo;
    }

    public Integer getAmount() {
        return amount;
    }

    public void setAmount(Integer amount) {
        this.amount = amount;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public BigDecimal getTotalMoney() {
        return totalMoney;
    }

    public void setTotalMoney(BigDecimal totalMoney) {
        this.totalMoney = totalMoney;
    }

    public String getBuyerName() {
        return buyerName;
    }

    public void setBuyerName(String buyerName) {
        this.buyerName = buyerName;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getOfflineStoreName() {
        return offlineStoreName;
    }

    public void setOfflineStoreName(String offlineStoreName) {
        this.offlineStoreName = offlineStoreName;
    }

    public Integer getSettlementDay() {
        return settlementDay;
    }

    public void setSettlementDay(Integer settlementDay) {
        this.settlementDay = settlementDay;
    }



    public BigDecimal getOrderMoney() {
        return totalMoney;
    }

    public void setOrderMoney(BigDecimal orderMoney) {
        this.orderMoney = orderMoney;
    }

    public BigDecimal getSettlementMoney() {
        return settlementMoney;
    }

    public void setSettlementMoney(BigDecimal settlementMoney) {
        this.settlementMoney = settlementMoney;
    }

    public BigDecimal getSettlementExpenses() {
        return settlementExpenses;
    }

    public void setSettlementExpenses(BigDecimal settlementExpenses) {
        this.settlementExpenses = settlementExpenses;
    }

    public BigDecimal getSettlementExpensesAdvance() {
        return settlementExpensesAdvance;
    }

    public void setSettlementExpensesAdvance(BigDecimal settlementExpensesAdvance) {
        this.settlementExpensesAdvance = settlementExpensesAdvance;
    }

    public String getApplyUserName() {
        return applyUserName;
    }

    public void setApplyUserName(String applyUserName) {
        this.applyUserName = applyUserName;
    }

    public Timestamp getApplyTime() {
        return applyTime;
    }





    public Timestamp getOrderCreateTime() {
        return orderCreateTime;
    }

    public void setOrderCreateTime(Timestamp orderCreateTime) {
        this.orderCreateTime = orderCreateTime;
    }

    public Timestamp getPayTime() {
        return payTime;
    }

    public void setPayTime(Timestamp payTime) {
        this.payTime = payTime;
    }

    public Timestamp getExpressTime() {
        return expressTime;
    }

    public void setExpressTime(Timestamp expressTime) {
        this.expressTime = expressTime;
    }

    public Timestamp getConfirmTime() {
        return confirmTime;
    }

    public void setConfirmTime(Timestamp confirmTime) {
        this.confirmTime = confirmTime;
    }

    public Timestamp getSettlementTime() {
        return settlementTime;
    }

    public void setSettlementTime(Timestamp settlementTime) {
        this.settlementTime = settlementTime;
    }

    public void setApplyTime(Timestamp applyTime) {
        this.applyTime = applyTime;
    }

    public Timestamp getSettlementTime1() {

        if (settlementStatus != null && settlementStatus == EMallShopSettlementStatus.Settlement.getStatus()) {
            return settlementTime;
        }
        return null;
    }

    public void setSettlementTime1(Timestamp settlementTime1) {
        this.settlementTime1 = settlementTime1;
    }

    public Timestamp getOrderFinishTime() {
        return orderFinishTime;
    }

    public void setOrderFinishTime(Timestamp orderFinishTime) {
        this.orderFinishTime = orderFinishTime;
    }

    public String getVehiclePhoneNum() {
        return vehiclePhoneNum;
    }

    public void setVehiclePhoneNum(String vehiclePhoneNum) {
        this.vehiclePhoneNum = vehiclePhoneNum;
    }

    public String getVehicleName() {
        return vehicleName;
    }

    public void setVehicleName(String vehicleName) {
        this.vehicleName = vehicleName;
    }

    public String getProjectName() {
        return projectName;
    }

    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }
}
